<div class="row-fluid sortable">		
    <div class="box span12">
        <div class="box-header" data-original-title>
            <h2><i class="icon-user"></i><span class="break"></span>Danh sách tham số</h2>
            <div class="box-icon">
                <a href="#" class="btn-setting"><i class="fa-icon-wrench"></i></a>
                <a href="#" class="btn-minimize"><i class="fa-icon-chevron-up"></i></a>
                <a href="#" class="btn-close"><i class="fa-icon-remove"></i></a>
            </div>
        </div>
        <div class="box-content">
            <table class="table table-striped table-bordered bootstrap-datatable datatable">
                <thead>
                    <tr>
                        <th>#</th>
                        <th>Tên Tham số</th>
                        <th>Giá trị</th>
<!--                        <th>Ngày đăng ký</th>
                        <th>Trạng thái</th>
                        <th>Actions</th>-->
                    </tr>
                </thead>   
                <tbody>
                    <?php
                    $count = 1;
                    foreach ($ThamSos as $ThamSo) { ?>
                        <tr data-id="<?php echo $ThamSo->id; ?>">
                            <td><?php echo $count++; ?></td>
                            <td class="td-key"><a class="editable" href="#" data-name="Key" data-type="text" data-pk="<?php echo $ThamSo->id; ?>" data-url="<?php echo Yii::app()->createUrl('admin/default/EditThamSo'); ?>"><?php echo $ThamSo->Key ?></a></td>
                            <td class="td-value"><a class="editable" href="#" data-name="Value" data-type="textarea" data-pk="<?php echo $ThamSo->id; ?>" data-url="<?php echo Yii::app()->createUrl('admin/default/EditThamSo'); ?>"><?php echo $ThamSo->Value ?></a></td>
                        </tr>
                    <?php } ?>
                </tbody>
            </table>            
        </div>
    </div><!--/span-->

</div><!--/row-->
<div class="modal hide fade" id="ChiTietNguoiDungModal">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">×</button>
        <h3>Settings</h3>
    </div>
    <div class="modal-body">
        <p>Here settings can be configured...</p>
    </div>
    <div class="modal-footer">
        <a href="#" class="btn" data-dismiss="modal">Close</a>
        <a href="#" class="btn btn-primary">Save changes</a>
    </div>
</div>

<script>
$(document).ready(function(){
    //turn to inline mode
        $.fn.editable.defaults.mode = 'inline';
        $('.editable').editable({
            onblur: 'submit',
            success: function(data, config) {
                if (data !== '1') {
                    return data;
                }
            }
        });
});
</script>